package mypackage;

import static org.junit.Assert.*;

import org.junit.Test;

public class TriangleTest
{
	@Test
	public void testDetermineType()
	{
		Triangle triangle = new Triangle();
		
		double[] fInput1 = {3.0, 4.0, 2.0};
		assertEquals("scalene triangle", triangle.determineType(fInput1));
		
		double[] fInput2 = {5.0, 4.0, 3.0};
		assertEquals("right scalene triangle", triangle.determineType(fInput2));

		double[] fInput3 = {2.0, 2.0, 1.0};
		assertEquals("isosceles triangle", triangle.determineType(fInput3));

		double[] fInput4 = {1.0, Math.sqrt(2), 1.0};
		assertEquals("right isosceles triangle", triangle.determineType(fInput4));

		double[] fInput5 = {2.0, 1.0, Math.sqrt(3)};
		assertEquals("right scalene triangle", triangle.determineType(fInput5));
		
		double[] fInput6 = {4.0, 3.0, 3.0};
		assertEquals("isosceles triangle", triangle.determineType(fInput6));

		double[] fInput7 = {Math.sqrt(5), Math.sqrt(5), Math.sqrt(5)};
		assertEquals("equilateral triangle", triangle.determineType(fInput7));
		
		double[] fInput8 = {3.0, 1.0, 2.0};
		assertEquals("invalid triangle", triangle.determineType(fInput8));
		
		double[] fInput9 = {1745942654, 1234567890, 1234567890};
		assertEquals("right isosceles triangle", triangle.determineType(fInput9));
		
		// Professor Laird's test cases
		
		double[] fInput10 = {1, 1, 2};
		assertEquals("invalid triangle", triangle.determineType(fInput10));
		
		double[] fInput11 = {1234567890, 1234567890, 1745942654};
		assertEquals("right isosceles triangle", triangle.determineType(fInput11));
		
		double[] fInput12 = {1, 1, 1.99};
		assertEquals("isosceles triangle", triangle.determineType(fInput12));
		
		// Dmitriy Grishin's team test cases
		
		double[] fInput13 = {1, 1, -1};
		assertEquals("invalid triangle", triangle.determineType(fInput13));
		
		double[] fInput14 = {2, 2, 2};
		assertEquals("equilateral triangle", triangle.determineType(fInput14));
		
		//double[] fInput15 = {10, 1, 2};
		//assertEquals("scalene triangle", triangle.determineType(fInput15));
		
		double[] fInput16 = {4, 6, 0};
		assertEquals("invalid triangle", triangle.determineType(fInput16));
		
		//double[] fInput17 = {22, ,33};
		//assertEquals(" triangle", triangle.determineType(fInput17));
		
		// Ernest Holloway's team test cases
		
		double[] fInput18 = {1.0, 1.0, 1.414};
		assertEquals("right isosceles triangle", triangle.determineType(fInput18));
		
		double[] fInput19 = {1.0, 1.0, 1.0};
		assertEquals("equilateral triangle", triangle.determineType(fInput19));
		
		double[] fInput20 = {3.0, 4.0, 5.0};
		assertEquals("right scalene triangle", triangle.determineType(fInput20));
		
		// My team's test cases:
		
		double[] fInput21 = {1.732051, 2.236068,1.414214};
		assertEquals("right scalene triangle", triangle.determineType(fInput21));
		
		double[] fInput22 = {1.000005, 1.000020, 1.5};
		assertEquals("isosceles triangle", triangle.determineType(fInput22));
		
		double[] fInput23 = {2.645751, 1.732051, 2.236068};
		assertEquals("scalene triangle", triangle.determineType(fInput23));
		
		// Nikolaos Alexiou and Michael Greene team's test cases
		
		double[] fInput24 = {2.43, 3.24, 4.05};
		assertEquals("right scalene triangle", triangle.determineType(fInput24));
		
		double[] fInput25 = {2, 2, 2.828427};
		assertEquals("right isosceles triangle", triangle.determineType(fInput25));
		
		double[] fInput26 = {3, 4, 8};
		assertEquals("invalid triangle", triangle.determineType(fInput26));
		
		/*double[] fInput = {};
		assertEquals(" triangle", triangle.determineType(fInput));*/
	}
}
